﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DB_NH.WebAPI_Model
{
    /// <summary>
    /// 获取待发邮件列表的API返回值
    /// </summary>
    [Serializable]
    public class ResultForSFMails : CommonResult
    {
        /// <summary>
        /// 邮件列表
        /// </summary>
        public List<SFMail> Mails { get; set; }

        public ResultForSFMails()
        {
            Mails = new List<SFMail>();
        }
    }

    /// <summary>
    /// 邮件类
    /// </summary>
    [Serializable]
    public class SFMail
    {
        /// <summary>
        /// 邮件ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 邮件接收人，以逗号分割开
        /// </summary>
        public string MailTo { get; set; }

        /// <summary>
        /// 邮件抄送接收人，以逗号分割开
        /// </summary>
        public string MailCC { get; set; }

        /// <summary>
        /// 邮件标题
        /// </summary>
        public string Title { get; set; }

        /// <summary>
        /// 邮件正文
        /// </summary>
        public string Content { get; set; }

        /// <summary>
        /// 附件列表
        /// </summary>
        public List<SFMailAttachment> Atts { get; set; }

        public SFMail()
        {
            Atts = new List<SFMailAttachment>();
        }
    }

    /// <summary>
    /// 邮件附件类
    /// </summary>
    [Serializable]
    public class SFMailAttachment
    {
        /// <summary>
        /// 附件ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 附件文件名
        /// </summary>
        public string FileName { get; set; }

        /// <summary>
        /// 附件文件数据
        /// </summary>
        public byte[] FileData { get; set; }
    }
}
